Remove empty elements from comma-separated list#40
Merged
aerorahul merged 1 commit intoJul 31, 2024
Merged
Conversation
Updates the list parsing in Configuration to remove empty strings from the comma-separated list. This will allow creating a single- element list by appending a `,` after the element. Refs: NOAA-EMC/global-workflow#2795
7 tasks
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #40 +/- ##
========================================
Coverage 50.12% 50.12%
========================================
Files 18 18
Lines 1652 1652
Branches 339 339
========================================
Hits 828 828
Misses 765 765
Partials 59 59 ☔ View full report in Codecov by Sentry. |
DavidHuber-NOAA
pushed a commit
to NOAA-EMC/global-workflow
that referenced
this pull request
Aug 12, 2024
Adds the ability to run a forecast in segments instead of all at once. To accomplish this, a new local `checkpnts` variable is introduced to `config.base` to contain a comma-separated list of intermediate stopping points for the forecast. This is combined with `FHMIN_GFS` and `FHMAX_GFS` to create a comma-separated string `FCST_SEGMENTS` with all the start/end points that is used by `config.fcst` and rocoto workflow. Capability to parse these into python lists was added to wxflow in an accompanying PR. If `checkpnts` is an empty string, this will result in a single-segment forecast. To accommodate the new segment metatasks that must be run serially, the capability of `create_task()` was expanded to allow a dictionary key of `is_serial`, which controls whether a metatask is parallel or serial using pre-existing capability in rocoto. The default when not given is parallel (i.e. most metatasks). Resolves #2274 Refs NOAA-EMC/wxflow#39 Refs NOAA-EMC/wxflow#40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Updates the list parsing in Configuration to remove empty strings from the comma-separated list. This will allow creating a single-element list by appending a
,after the element, as well as just relax syntax on lists by ignore a trailing,.Refs: NOAA-EMC/global-workflow#2795
Type of change
How Has This Been Tested?
Checklist